package cn.com.cetccst.appstore.database.dao;

import static androidx.room.OnConflictStrategy.REPLACE;

import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;

import java.util.List;

import cn.com.cetccst.appstore.database.model.AppModel;

public interface BaseDao<T> {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(T... entity);

    @Insert(onConflict = REPLACE)
    void insert(T entity);

    @Delete
    int delete(T entity);

    @Update(onConflict = REPLACE)
    int update(T entity);

    @Insert(onConflict = REPLACE)
    void insertAll(List<T> apps);
}

